feat(claude): emit experimental themes and monitors (#187) - #302
Conversation
🦋 Changeset detectedLatest commit: 723d043 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 723d043e17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `Claude monitors[${index}] command cannot reference \`\${user_config.*}\`; Claude Code runs monitor commands through a shell and rejects them instead of substituting the value, and monitor processes do not receive CLAUDE_PLUGIN_OPTION_ environment variables.`, | ||
| )); | ||
| } else { | ||
| planned['command'] = command; |
There was a problem hiding this comment.
Translate bundle path tokens in monitor commands
When a monitor command uses the package's public pathTokens.pluginRoot, pathTokens.pluginData, or pathTokens.workspaceRoot values, this assignment writes the opaque agent-bundle:path:* token directly into monitors.json. Unlike the existing MCP and LSP planners, it never calls expandClaudeToken, so a normal command such as node ${pathTokens.pluginRoot}/watch.mjs points at a nonexistent runtime path and the monitor cannot start.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2530cc32. planClaudeMonitors now lowers its command through expandClaudeToken, with regression coverage proving agent-bundle:path:plugin-root emits ${CLAUDE_PLUGIN_ROOT}.
| "$id": "https://agent-bundle.dev/schemas/claude/2.1.250/theme.schema.json", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "base": { "minLength": 1, "type": "string" }, |
There was a problem hiding this comment.
Restrict theme bases to the documented presets
The experimental theme contract treats base as a preset selector, but this schema accepts every nonempty string, and planClaudeThemes performs the same permissive check. Consequently a typo such as base: "drak" passes compilation and artifact validation even though native strict validation does not inspect theme contents, leaving the user with a shipped theme whose base cannot be resolved; encode the supported base values as an enum and mirror that narrowing in ClaudeThemeConfig.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2530cc32. ClaudeThemeConfig.base, the planner, and theme.schema.json now accept only the documented dark and light presets; typo coverage and the re-pinned schema hash are included.
Summary
Slice 2 (4/4) of the #187 Claude parity pass: experimental theme and monitor declarations.
themesandmonitorstoClaudeHostConfig; the adapter validates declarations and emitsthemes/<name>.jsonandmonitors/monitors.jsondocuments at the documented default locations (Claude Code docs, retrieved 2026-09-02, mark both surfaces experimental).theme.schema.jsonandmonitors.schema.json, pinned inPROVENANCE.jsonwith recorded tightenings (monitorcommandrejects${user_config.*}interpolation since the CLI does not resolve it in monitor context; themebaseis a closed enum).validate-artifact.tsgains single-wildcard document patterns (themes/*.json) so dynamically named theme documents are schema-validated and owned.experimentalThemesandmonitors(Claude: supported-experimental with dated evidence; unified plugin adapter: unavailable, following thelspprecedent).claude.themes.*/claude.monitors.*; native proofs runclaude plugin validate --strictagainst emitted artifacts and record that the CLI does not inspect theme/monitor contents (honest gap noted in PROVENANCE).adapterRevision: claude 1.12.0 -> 1.13.0, plugin 1.11.0 -> 1.12.0.Test plan
pnpm -w typecheckandpnpm -w lintclean